import cn.yunhe.dao.IStockDao;
import cn.yunhe.entity.Stock;
import cn.yunhe.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Before;
import org.junit.Test;

import java.util.List;

/**
 * 邓永凯测试库存模块
 */
public class StockDemo {
    SqlSession sqlSession;
    IStockDao iStock;

    @Before
    public void init() {
        sqlSession = SqlSessionFactoryUtil.getSqlSession();
        iStock = sqlSession.getMapper(IStockDao.class);
    }

    /**
     * 邓永凯测试 获取库存列表模块
     */
    @Test
    public void test1() {
        List<Stock> stockList = iStock.getAllStock();
        System.out.println(stockList.size());
    }
}
